import cv2
from PIL import Image

def img_capture(video):
	cap=cv2.VideoCapture(video)
	num=0
	ret,frame=cap.read()
	while ret:
		cv2.imwrite("part1out/%d.png" % num, frame)
		print("[I] Get %d Frame!" % num)
		if num>5070:
			print("[I] Save Done!\n")
			break
		ret, frame=cap.read()
		num+=1

img_capture("video.mp4")
exit=input("[I] Done!")